<?php

namespace Action\User;

class Wall extends \Library\Action\UserAction 
	implements \Library\Action\AjaxAction {

	private $_user = null;
	private $_wall = null;


	public function getUserId() {
		return $this->getParam( 'id' );
	}
	
	public function getUser() {
		if( $this->_user === null ) {
			$this->_user = \Bean\User::get( $this->getUserId() );
		}
		return $this->_user;
	}

	public function getWall() {
		if( $this->_wall === null ) {
			$this->_wall = \Bean\Flow\PostsFlow::getFlow( array(
				'flow_id' => $this->getUser()->getFlowId(),
				'type' => 'User'
			) );
		}
		return $this->_wall;
	}


}
